<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="UTF-8">
<head th:include="includes/list-include :: list-header"></head>
<body class="gray-bg">

<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="myForm" class="form-inline">
                <div class="row">
                    <div class="form-group">
                        <div class="col-md-4">
                            <input type="text" id="menuName" name="menuName" placeholder="菜单名称" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4">
                            <select id="isHide" name="isHide"
                                    class="selectpicker show-tick form-control" th:with="types=${@dict.getData('show_hide')}">
                                <option value="">-- 菜单状态 --</option>
                                <option th:each="dict : ${types}" th:value="${dict.dictCode}" th:text="${dict.dictValue}"></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <a class="btn btn-info btn-rounded btn-rd" onclick="$.treeTable.search()"><i class="fa fa-search"></i>&nbsp;查询</a>
                        <a class="btn btn-warning btn-rounded btn-rd" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                    </div>
                </div>
            </form>
        </div>

        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.addFull(0)" shiro:hasPermission="system:menu:add">
                <i class="fa fa-plus"></i> 新增
            </a>
            <a class="btn btn-primary" onclick="$.operate.editTreeFull()" shiro:hasPermission="system:menu:edit">
                <i class="fa fa-edit"></i> 修改
            </a>
            <a class="btn btn-info" id="expandAllBtn">
                <i class="fa fa-exchange"></i> 展开/折叠
            </a>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="includes/list-include :: list-footer"></div>
<script th:src="@{/script/system/menu/list.js}"></script>
<script th:inline="javascript">
    var addFlag = [[${@permission.hasPermission('system:menu:add')}]];
    var editFlag = [[${@permission.hasPermission('system:menu:edit')}]];
    var removeFlag = [[${@permission.hasPermission('system:menu:remove')}]];
    var datas = [[${@dict.getData('show_hide')}]];
    var prefix = ctx + "system/menu";
</script>
</body>
</html>